package com.cryptoneedle.center.source.properties;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * <p>description: 源数据源配置项 </p>
 *
 * @author CryptoNeedle
 * @date 2025-06-23
 */
@Data
@Component
@ConfigurationProperties(prefix = "source")
@Schema(description = "源数据源配置项")
public class SourceProperties {

    /**
     * 该参数用于控制统计源数据源表、列的增强信息的时间周期
     */
    @Schema(description = "采集信息可信度在N天前端过期")
    private Integer expireIntervalDay = 1;

    private DorisAnalyze dorisAnalyze = new DorisAnalyze();

    @Data
    @Schema(description = "Doris分析配置项")
    public static class DorisAnalyze {

        @Schema(description = "开启Doris分析")
        private Boolean enable = true;

        @Schema(description = "Doris分析所有列")
        private Boolean allColumn = false;

        @Schema(description = "Doris分析等待间隔(ms)")
        private Integer waitTime = 30 * 1000;
    }
}